using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ReadyToUseTools._Elevation
{
    /// <summary>
    /// <para>Viewshed</para>
    /// <para>Returns polygons of visible areas for a given set of input observation points.</para>
    /// <para>返回一组给定输入观测点的可见区域的面。</para>
    /// </summary>    
    [DisplayName("Viewshed")]
    public class Viewshed : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Viewshed()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_InputPoints">
        /// <para>Input Point Features</para>
        /// <para>The point features to use as the observer locations.</para>
        /// <para>用作观察点位置的点要素。</para>
        /// </param>
        public Viewshed(object _InputPoints)
        {
            this._InputPoints = _InputPoints;
        }
        public override string ToolboxName => "Ready To Use Tools";

        public override string ToolName => "Viewshed";

        public override string CallName => "agolservices.Viewshed";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_InputPoints, _MaximumDistance, _MaximumDistanceUnits.GetGPValue(), _DEMResolution.GetGPValue(), _ObserverHeight, _ObserverHeightUnits.GetGPValue(), _SurfaceOffset, _SurfaceOffsetUnits.GetGPValue(), _GeneralizeViewshedPolygons.GetGPValue(), _OutputViewshed];

        /// <summary>
        /// <para>Input Point Features</para>
        /// <para>The point features to use as the observer locations.</para>
        /// <para>用作观察点位置的点要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Point Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _InputPoints { get; set; }


        /// <summary>
        /// <para>Maximum Distance</para>
        /// <para>The maximum distance to calculate the viewshed.</para>
        /// <para>计算视域的最大距离。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Distance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _MaximumDistance { get; set; } = null;


        /// <summary>
        /// <para>Maximum Distance Units</para>
        /// <para><xdoc>
        ///   <para>Specifies the units for the Maximum Distance parameter.</para>
        ///   <bulletList>
        ///     <bullet_item>Meters—The units are meters. This is the default.</bullet_item><para/>
        ///     <bullet_item>Kilometers—The units are kilometers.</bullet_item><para/>
        ///     <bullet_item>Feet—The units are feet.</bullet_item><para/>
        ///     <bullet_item>Yards—The units are yards.</bullet_item><para/>
        ///     <bullet_item>Miles—The units are miles.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定“最大距离”参数的单位。</para>
        ///   <bulletList>
        ///     <bullet_item>米 - 单位为米。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>千米 - 单位为千米。</bullet_item><para/>
        ///     <bullet_item>英尺 - 单位为英尺。</bullet_item><para/>
        ///     <bullet_item>码 - 单位为码。</bullet_item><para/>
        ///     <bullet_item>英里—单位为英里。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Distance Units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _MaximumDistanceUnits_value _MaximumDistanceUnits { get; set; } = _MaximumDistanceUnits_value._Meters;

        public enum _MaximumDistanceUnits_value
        {
            /// <summary>
            /// <para>Meters</para>
            /// <para>Meters—The units are meters. This is the default.</para>
            /// <para>米 - 单位为米。这是默认设置。</para>
            /// </summary>
            [Description("Meters")]
            [GPEnumValue("Meters")]
            _Meters,

            /// <summary>
            /// <para>Kilometers</para>
            /// <para>Kilometers—The units are kilometers.</para>
            /// <para>千米 - 单位为千米。</para>
            /// </summary>
            [Description("Kilometers")]
            [GPEnumValue("Kilometers")]
            _Kilometers,

            /// <summary>
            /// <para>Feet</para>
            /// <para>Feet—The units are feet.</para>
            /// <para>英尺 - 单位为英尺。</para>
            /// </summary>
            [Description("Feet")]
            [GPEnumValue("Feet")]
            _Feet,

            /// <summary>
            /// <para>Yards</para>
            /// <para>Yards—The units are yards.</para>
            /// <para>码 - 单位为码。</para>
            /// </summary>
            [Description("Yards")]
            [GPEnumValue("Yards")]
            _Yards,

            /// <summary>
            /// <para>Miles</para>
            /// <para>Miles—The units are miles.</para>
            /// <para>英里—单位为英里。</para>
            /// </summary>
            [Description("Miles")]
            [GPEnumValue("Miles")]
            _Miles,

        }

        /// <summary>
        /// <para>DEM Resolution</para>
        /// <para><xdoc>
        ///   <para>Specifies the approximate spatial resolution (cell size) of the source elevation data used for the calculation.</para>
        ///   <para>The resolution keyword is an approximation of the spatial resolution of the digital elevation model. Many elevation sources are distributed in units of arc seconds; the keyword is an approximation in meters for easier understanding.</para>
        ///   <bulletList>
        ///     <bullet_item>Finest—The finest units available for the extent are used.</bullet_item><para/>
        ///     <bullet_item>10 meters—The elevation source resolution is 1/3 arc second or approximately 10 meters.</bullet_item><para/>
        ///     <bullet_item>24 meters—The elevation source is the Airbus WorldDEM4Ortho dataset at 24 meters resolution.</bullet_item><para/>
        ///     <bullet_item>30 meters—The elevation source resolution is 1 arc second or approximately 30 meters.</bullet_item><para/>
        ///     <bullet_item>90 meters—The elevation source resolution is 3 arc seconds or approximately 90 meters. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于计算的源高程数据的近似空间分辨率（像元大小）。</para>
        ///   <para>resolution 关键字是数字高程模型空间分辨率的近似值。许多高程源以角秒为单位分布;关键字是以米为单位的近似值，以便于理解。</para>
        ///   <bulletList>
        ///     <bullet_item>最佳 - 使用范围中可用的最精细单位。</bullet_item><para/>
        ///     <bullet_item>10 米 - 高程源分辨率为 1/3 角秒或大约 10 米。</bullet_item><para/>
        ///     <bullet_item>24 米 - 高程源为分辨率为 24 米的 Airbus WorldDEM4Ortho 数据集。</bullet_item><para/>
        ///     <bullet_item>30 米 - 高程源分辨率为 1 角秒或大约 30 米。</bullet_item><para/>
        ///     <bullet_item>90 米 - 高程源分辨率为 3 角秒或大约 90 米。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("DEM Resolution")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _DEMResolution_value? _DEMResolution { get; set; } = null;

        public enum _DEMResolution_value
        {
            /// <summary>
            /// <para>Finest</para>
            /// <para>Finest—The finest units available for the extent are used.</para>
            /// <para>最佳 - 使用范围中可用的最精细单位。</para>
            /// </summary>
            [Description("Finest")]
            [GPEnumValue("FINEST")]
            _FINEST,

            /// <summary>
            /// <para>10 meters</para>
            /// <para>10 meters—The elevation source resolution is 1/3 arc second or approximately 10 meters.</para>
            /// <para>10 米 - 高程源分辨率为 1/3 角秒或大约 10 米。</para>
            /// </summary>
            [Description("10 meters")]
            [GPEnumValue("10m")]
            _10m,

            /// <summary>
            /// <para>24 meters</para>
            /// <para>24 meters—The elevation source is the Airbus WorldDEM4Ortho dataset at 24 meters resolution.</para>
            /// <para>24 米 - 高程源为分辨率为 24 米的 Airbus WorldDEM4Ortho 数据集。</para>
            /// </summary>
            [Description("24 meters")]
            [GPEnumValue("24m")]
            _24m,

            /// <summary>
            /// <para>30 meters</para>
            /// <para>30 meters—The elevation source resolution is 1 arc second or approximately 30 meters.</para>
            /// <para>30 米 - 高程源分辨率为 1 角秒或大约 30 米。</para>
            /// </summary>
            [Description("30 meters")]
            [GPEnumValue("30m")]
            _30m,

            /// <summary>
            /// <para>90 meters</para>
            /// <para>90 meters—The elevation source resolution is 3 arc seconds or approximately 90 meters. This is the default.</para>
            /// <para>90 米 - 高程源分辨率为 3 角秒或大约 90 米。这是默认设置。</para>
            /// </summary>
            [Description("90 meters")]
            [GPEnumValue("90m")]
            _90m,

        }

        /// <summary>
        /// <para>Observer Height</para>
        /// <para>The height above the surface of the observer. The default value of 1.75 meters is an average height of a person. If you are looking from an elevated location such as an observation tower or a tall building, use that height instead.</para>
        /// <para>观察点表面上方的高度。默认值 1.75 米是一个人的平均身高。如果您从高处观看，例如观景塔或高层建筑，请改用该高度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Observer Height")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _ObserverHeight { get; set; } = 1.75;


        /// <summary>
        /// <para>Observer Height Units</para>
        /// <para><xdoc>
        ///   <para>Specifies the units for the Observer Height parameter.</para>
        ///   <bulletList>
        ///     <bullet_item>Meters—The units are meters. This is the default.</bullet_item><para/>
        ///     <bullet_item>Kilometers—The units are kilometers.</bullet_item><para/>
        ///     <bullet_item>Feet—The units are feet.</bullet_item><para/>
        ///     <bullet_item>Yards—The units are yards.</bullet_item><para/>
        ///     <bullet_item>Miles—The units are miles.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定观察点高度参数的单位。</para>
        ///   <bulletList>
        ///     <bullet_item>米 - 单位为米。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>千米 - 单位为千米。</bullet_item><para/>
        ///     <bullet_item>英尺 - 单位为英尺。</bullet_item><para/>
        ///     <bullet_item>码 - 单位为码。</bullet_item><para/>
        ///     <bullet_item>英里—单位为英里。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Observer Height Units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _ObserverHeightUnits_value _ObserverHeightUnits { get; set; } = _ObserverHeightUnits_value._Meters;

        public enum _ObserverHeightUnits_value
        {
            /// <summary>
            /// <para>Meters</para>
            /// <para>Meters—The units are meters. This is the default.</para>
            /// <para>米 - 单位为米。这是默认设置。</para>
            /// </summary>
            [Description("Meters")]
            [GPEnumValue("Meters")]
            _Meters,

            /// <summary>
            /// <para>Kilometers</para>
            /// <para>Kilometers—The units are kilometers.</para>
            /// <para>千米 - 单位为千米。</para>
            /// </summary>
            [Description("Kilometers")]
            [GPEnumValue("Kilometers")]
            _Kilometers,

            /// <summary>
            /// <para>Feet</para>
            /// <para>Feet—The units are feet.</para>
            /// <para>英尺 - 单位为英尺。</para>
            /// </summary>
            [Description("Feet")]
            [GPEnumValue("Feet")]
            _Feet,

            /// <summary>
            /// <para>Yards</para>
            /// <para>Yards—The units are yards.</para>
            /// <para>码 - 单位为码。</para>
            /// </summary>
            [Description("Yards")]
            [GPEnumValue("Yards")]
            _Yards,

            /// <summary>
            /// <para>Miles</para>
            /// <para>Miles—The units are miles.</para>
            /// <para>英里—单位为英里。</para>
            /// </summary>
            [Description("Miles")]
            [GPEnumValue("Miles")]
            _Miles,

        }

        /// <summary>
        /// <para>Surface Offset</para>
        /// <para>The height above the surface of the object you are viewing. The default value is 0. If you are viewing buildings or wind turbines, use their height.</para>
        /// <para>您正在查看的对象表面上方的高度。默认值为 0。如果您正在查看建筑物或风力涡轮机，请使用它们的高度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Surface Offset")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _SurfaceOffset { get; set; } = 0;


        /// <summary>
        /// <para>Surface Offset Units</para>
        /// <para><xdoc>
        ///   <para>Specifies the units for the Surface Offset parameter.</para>
        ///   <bulletList>
        ///     <bullet_item>Meters—The units are meters. This is the default.</bullet_item><para/>
        ///     <bullet_item>Kilometers—The units are kilometers.</bullet_item><para/>
        ///     <bullet_item>Feet—The units are feet.</bullet_item><para/>
        ///     <bullet_item>Yards—The units are yards.</bullet_item><para/>
        ///     <bullet_item>Miles—The units are miles.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定“曲面偏移”（Surface Offset） 参数的单位。</para>
        ///   <bulletList>
        ///     <bullet_item>米 - 单位为米。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>千米 - 单位为千米。</bullet_item><para/>
        ///     <bullet_item>英尺 - 单位为英尺。</bullet_item><para/>
        ///     <bullet_item>码 - 单位为码。</bullet_item><para/>
        ///     <bullet_item>英里—单位为英里。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Surface Offset Units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _SurfaceOffsetUnits_value _SurfaceOffsetUnits { get; set; } = _SurfaceOffsetUnits_value._Meters;

        public enum _SurfaceOffsetUnits_value
        {
            /// <summary>
            /// <para>Meters</para>
            /// <para>Meters—The units are meters. This is the default.</para>
            /// <para>米 - 单位为米。这是默认设置。</para>
            /// </summary>
            [Description("Meters")]
            [GPEnumValue("Meters")]
            _Meters,

            /// <summary>
            /// <para>Kilometers</para>
            /// <para>Kilometers—The units are kilometers.</para>
            /// <para>千米 - 单位为千米。</para>
            /// </summary>
            [Description("Kilometers")]
            [GPEnumValue("Kilometers")]
            _Kilometers,

            /// <summary>
            /// <para>Feet</para>
            /// <para>Feet—The units are feet.</para>
            /// <para>英尺 - 单位为英尺。</para>
            /// </summary>
            [Description("Feet")]
            [GPEnumValue("Feet")]
            _Feet,

            /// <summary>
            /// <para>Yards</para>
            /// <para>Yards—The units are yards.</para>
            /// <para>码 - 单位为码。</para>
            /// </summary>
            [Description("Yards")]
            [GPEnumValue("Yards")]
            _Yards,

            /// <summary>
            /// <para>Miles</para>
            /// <para>Miles—The units are miles.</para>
            /// <para>英里—单位为英里。</para>
            /// </summary>
            [Description("Miles")]
            [GPEnumValue("Miles")]
            _Miles,

        }

        /// <summary>
        /// <para>Generalize Viewshed Polygons</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the viewshed polygons will be generalized.</para>
        ///   <para>The viewshed calculation is based on a raster elevation model that creates a result with stair-stepped edges. To create a more pleasing appearance and improve performance, the default behavior generalizes the polygons. This generalization will not change the accuracy of the result for any location more than one half of the DEM resolution.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The viewshed polygons will be generalized. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The viewshed polygons will not be generalized.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否对视域面进行通用化。</para>
        ///   <para>视域计算基于栅格高程模型，该模型创建具有阶梯式边的结果。为了创建更美观的外观并提高性能，默认行为将通用化多边形。这种概括不会改变任何位置的结果精度，超过DEM分辨率的一半。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 视域面将被概化。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 视域面不会被概化。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Generalize Viewshed Polygons")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _GeneralizeViewshedPolygons_value _GeneralizeViewshedPolygons { get; set; } = _GeneralizeViewshedPolygons_value._true;

        public enum _GeneralizeViewshedPolygons_value
        {
            /// <summary>
            /// <para>GENERALIZE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("GENERALIZE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_GENERALIZE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_GENERALIZE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output Viewshed</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Viewshed")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _OutputViewshed { get; set; }


        public Viewshed SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}